home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 19 / Amiga Format CD19 (1997-10-02)(Future Publishing)(GB)(Track 1 of 5)[!][issue 1997-11].iso / -seriously_amiga- / shareware / workbench / tragicwb / install_tragicwb next >
Text File  |  1997-08-26  |  5KB  |  180 lines

  1. (
  2.     ;Warn about buggy versions of Installer
  3.     (if (< @installer-version 43)
  4.     (message "Since you have an old version of Installer, this script "
  5.         "may not work correctly. You are advised to abort now and update "
  6.         "your copy of Installer before proceeding." (all))
  7.     )
  8.  
  9.     (if (= @user-level 0)
  10.     (fail "\n\nThis script does not run in Novice mode.")
  11.     )
  12.  
  13.     (set #inst-op
  14.     (askchoice
  15.         (prompt "Select the operation you wish to carry out:")
  16.         (help @askchoice-help)
  17.         (choices "pInstall TragicWB" "Update TragicWB" "Uninstall TragicWB")
  18.     )
  19.     )
  20.  
  21.     (set #dest
  22.     (askdir
  23.         (prompt
  24.         ("Select the directory %s:"
  25.             (select (= #inst-op 0) "TragicWB was installed in" "to install TragicWB in")
  26.         )
  27.         )
  28.         (help @askdir-help)
  29.         (default "C:")
  30.     )
  31.     )
  32.  
  33.     (set @default-dest #dest)
  34.     (set #dest-file (tackon #dest "TragicWB"))
  35.  
  36.     (set #inst-guide
  37.     (or
  38.         (= @user-level 0)
  39.         (askbool
  40.         (prompt
  41.             ("Do you want to %s the guide to TragicWB?"
  42.             (select #inst-op "install" "update" "delete")
  43.             )
  44.         )
  45.         (help "Answer Yes if you want the guide to be easily "
  46.             "accessible. Answer No if you don't mind hunting "
  47.             "for it when you need it...")
  48.         )
  49.     )
  50.     )
  51.  
  52.     (if #inst-guide
  53.     (set #guide-dest
  54.         (askdir
  55.         (prompt
  56.             ("Select the directory %s:"
  57.             (select (= #inst-op 0) "the guide was installed in" "to install the guide in")
  58.             )
  59.         )
  60.         (help @askdir-help)
  61.         (default "HELP:english/")
  62.         )
  63.     )
  64.     )
  65.  
  66.     (if (= #inst-op 2)
  67.     (
  68.         (delete #dest-file)
  69.         (if #inst-guide
  70.         (delete (tackon #guide-dest "TragicWB.guide"))
  71.         )
  72.         (startup @app-name "" (prompt "") (help ""))
  73.         (exit "\n\nUninstallation complete. Aw, didn't you like my program?" (quiet))
  74.     )
  75.     )
  76.  
  77.     (if (= #inst-op 0)
  78.     (
  79.         (set #startup
  80.         (askbool
  81.             (prompt "Do you want TragicWB to start when you boot your Amiga?")
  82.             (help "If you answer Yes, TragicWB will be added to your "
  83.               "user-startup file, so it will start automatically "
  84.               "when you switch on or reboot your Amiga. If you "
  85.               "answer No, you will have to start TragicWB "
  86.               "from a CLI, which isn't very convenient and "
  87.               "may not work at all.")
  88.         )
  89.         )
  90.  
  91.         (set #installpal
  92.         (askbool
  93.             (prompt "Do you want to use the Magic Workbench palette?")
  94.             (help "If you answer Yes, your palette preferences will "
  95.               "be set to the Magic Workbench  colour scheme. If you answer "
  96.               "No, then your palette will not be changed, and "
  97.               "old-style Magic Workbench icons will still have the wrong "
  98.               "colours.")
  99.         )
  100.         )
  101.  
  102.         (set #depth "")
  103.  
  104.         (set #depth-opt
  105.         (askchoice
  106.             (prompt "When should TragicWB obtain pens for the standard "
  107.             "NewIcons colours?")
  108.             (help "If you don't use NewIcons or don't want to change "
  109.             "the way NewIcons dynamically allocates pens, answer "
  110.             "\"Never\". Otherwise choose how the minimum number "
  111.             "of colours on the Workbench screen for TragicWB "
  112.             "to allocate NewIcons pens. I'd suggest choosing "
  113.             "32 or 64 colours, as preferences plus MagicWB "
  114.             "plus NewIcons colours gives a total of 22 pens.")
  115.             (choices
  116.             "pNever"
  117.             "When WB has 16 or more colours"
  118.             "When WB has 32 or more colours"
  119.             "When WB has 64 or more colours"
  120.             "When WB has 128 or more colours"
  121.             "When WB has 256 or more colours")
  122.         )
  123.         )
  124.         (if (> #depth-opt 0)
  125.         (set #depth (" NEWICONSDEPTH=%ld" (+ #depth-opt 3)))
  126.         )
  127.  
  128.         (set #startnow
  129.         (askbool
  130.             (prompt "Do you want to start TragicWB now?")
  131.             (help "If you answer Yes, TragicWB will be started as "
  132.               "soon as it has been installed. If you answer "
  133.               "No, it will not start until you reboot or run "
  134.               "it from a CLI.")
  135.         )
  136.         )
  137.     )
  138.     )
  139.  
  140.     (complete 20)
  141.  
  142.     (copyfiles (source "TragicWB") (dest #dest) (prompt "") (help ""))
  143.     (if #inst-guide
  144.     (copyfiles (source "TragicWB.guide") (dest #guide-dest) (infos))
  145.     )
  146.  
  147.     (if (= #inst-op 1)
  148.     (exit "\n\nUpdate complete." (quiet))
  149.     )
  150.  
  151.     (complete 40)
  152.  
  153.     (if #startup
  154.     (startup @app-name
  155.         (command (cat #dest-file #depth))
  156.         (prompt "") (help "")
  157.     )
  158.     )
  159.  
  160.     (if #installpal
  161.     (
  162.         (copyfiles (source "MWB-palette.pre") (dest "envarc:sys") (newname "palette.prefs") (prompt "") (help ""))
  163.  
  164.         (complete 60)
  165.  
  166.         (if #startnow
  167.         (copyfiles (source "MWB-palette.pre") (dest "env:sys") (newname "palette.prefs") (prompt "") (help ""))
  168.         )
  169.     )
  170.     )
  171.  
  172.     (complete 80)
  173.  
  174.     (if #startnow
  175.     (run (cat #dest-file #depth) (prompt "") (help ""))
  176.     )
  177.  
  178.     (exit "\n\nInstallation complete." (quiet))
  179. )
  180.